package com.kaifamiao.begins;

import java.util.Arrays;

public class TestBag2 {

    public static void main(String[] args) {

        Bag b = new Bag( 5, 0.8f );
        System.out.println( b.isEmpty() );

        b.add( "李某芳" );
        b.add( "李某元" );

        Object[] array = b.toArray();
        System.out.println( Arrays.toString(array) );
        array[0] = "李元芳";
        array[1] = "狄仁杰";
        System.out.println( Arrays.toString(array) );

        System.out.println( b );
        System.out.println( b.isEmpty() );

        b.clear();

        System.out.println( b.isEmpty() );
    }

}
